* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

.header {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-bottom: 1px solid rgba(74,85,104,0.1);
}

.header h1 {
    margin-left: 10px;
    font-size: 40px;
    color: #2d3748;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.crisis-container {
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    height: calc(100vh - 150px);
}

.user-info-panel {
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    padding: 25px;
    overflow-y: auto;
}

.panel-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.panel-header h2 {
    font-size: 24px;
    color: #2d3748;
    margin-left: 10px;
}

.crisis-level {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    margin-left: auto;
}

.crisis-high {
    background: #fed7d7;
    color: #c53030;
    animation: pulse 2s infinite;
}

.crisis-medium {
    background: #feebc8;
    color: #dd6b20;
}

.crisis-low {
    background: #c6f6d5;
    color: #38a169;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.user-basic-info {
    background: #f8fafc;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #4299e1;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}

.info-label {
    font-weight: bold;
    color: #4a5568;
    flex: 1;
}

.info-value {
    color: #2d3748;
    flex: 2;
    text-align: right;
}

.risk-indicators {
    margin-top: 25px;
}

.risk-item {
    display: flex;
    align-items: center;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 8px;
    background: white;
    border-left: 4px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.risk-high {
    border-left-color: #e53e3e;
    background: #fed7d7;
}

.risk-medium {
    border-left-color: #dd6b20;
    background: #feebc8;
}

.risk-low {
    border-left-color: #38a169;
    background: #c6f6d5;
}

.visualization-panel {
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    padding: 25px;
    overflow-y: auto;
}

.chart-container {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 10px;
}

.chart-title {
    font-size: 18px;
    font-weight: bold;
    color: #2d3748;
    margin-bottom: 15px;
    text-align: center;
}

.chart-placeholder {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    position: relative;
    overflow: hidden;
}

.emergency-actions {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.emergency-btn {
    padding: 15px 25px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.emergency-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.btn-emergency {
    background: linear-gradient(135deg, #e53e3e, #c53030);
    color: white;
}

.btn-contact {
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: white;
}

.btn-resources {
    background: linear-gradient(135deg, #38a169, #2f855a);
    color: white;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
}

.progress-high {
    background: linear-gradient(90deg, #e53e3e, #c53030);
}

.progress-medium {
    background: linear-gradient(90deg, #dd6b20, #c05621);
}

.progress-low {
    background: linear-gradient(90deg, #38a169, #2f855a);
}

.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.data-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    text-align: center;
    border-top: 4px solid #4299e1;
}

.data-card h3 {
    color: #2d3748;
    margin-bottom: 10px;
}

.data-card .value {
    font-size: 28px;
    font-weight: bold;
    color: #4299e1;
}

.footer {
    text-align: center;
    padding: 20px;
    background: #2d3748;
    color: white;
    margin-top: 40px;
}

.mood-timeline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: linear-gradient(90deg, #c6f6d5, #feebc8, #fed7d7);
    border-radius: 10px;
    margin: 15px 0;
}

.mood-point {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 80%;
    max-width: 600px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}
